<template>
    <div>
        <Form :label-width="130" inline>

            <Form-item label="救助类型:">
                <c-dict-select v-model="queryParam.assistancetype" dictCode="assistancetype"/>
            </Form-item>
            <Form-item label="业务类型:">
                <c-dict-select v-model="queryParam.handletype" dictCode="handletype" hiddenKeys="201,202,203,400"/>
            </Form-item>
            <Row class="button_row">
                <span style="float: left;">
                <Button type="primary" @click="handleAdd()">新增</Button>
                </span>
                <span style="float: right;">
                      <Button type="primary" @click="searchQuery">查询</Button>
                <Button type="primary" class="button_item_left" @click="searchReset">重置</Button>
                </span>
            </Row>
        </Form>
        <div class="table_div">
            <vxe-table border
                       resizable
                       row-id="id"
                       :row-key="true"
                       show-overflow="tooltip"
                       highlight-hover-row
                       align="center"
                       header-align="center"
                       ref="xTree"
                       :loading="Loading"
                       :data="tableData">
                <vxe-table-column field="processname" title="流程名称" align="center"/>
                <vxe-table-column field="processkey" title="流程定义key" align="center"/>
                <vxe-table-column field="assistancetype_name" title="救助类型" align="center"/>
                <vxe-table-column field="handletype_name" title="业务类型" align="center"/>
                <vxe-table-column field="orderid" title="行权事项编码" align="center"/>
                <vxe-table-column field="" title="操作" min-width="100">
                    <template v-slot="{ row }">
                        <Button size="small" class="actionBtn" type="info" style="margin-right: 5px"
                                @click="handleEdit(row)">编辑
                        </Button>
                        <Button size="small" class="actionBtn" type="success" style="margin-right: 5px"
                                @click="Edit(row)">节点信息
                        </Button>
                    </template>
                </vxe-table-column>
            </vxe-table>
            <Page :total="dataCount" :page-size="pageSize" show-total class="paging"
                  @on-change="handleTableChange" :current="pageNo"></Page>
        </div>
        <modal ref="modalForm" @ok="modalFormOk"/>
    </div>

</template>
<script>
    import {CommonMixin} from '@/views/common/js/CommonMixin'
    import {getAction, postAction} from '@/api/request'
    import Modal from './modules/ExtActProcessModal'

    export default {
        mixins: [CommonMixin],
        components: { Modal},
        data() {
            return {
                columns: [],
                queryParam: {},
                Loading: true,
                url: {
                    list: "/api/ac/subsistence/extActProcessService/page"
                },
            }
        },
        methods: {
            Edit(row) {
                this.$emit('config', row.processkey);
            }
        },
        created() {
            this.loadData();

        },
    }
</script>
<style scoped>
    .paging {
        float: right;
        margin-top: 10px;
    }

    /deep/ .ivu-upload-list {
        display: none;
    }

    /deep/ .ivu-table-cell {
        padding-right: 0px;
        padding-left: 0px;
    }

    /deep/ #area .ivu-col-span-8 {
        width: 50%;
    }

    #area :nth-child(3) {
        display: none;
    }
</style>
